package com.zkthink.ceres.order.config;

import com.zkthink.ceres.order.properties.KdNiaoProperties;
import com.zkthink.ceres.order.util.KdniaoTrackQueryAPI;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author JustArgo
 */
@Configuration
@EnableConfigurationProperties({KdNiaoProperties.class})
public class KdNiaoConfiguration {

	@Bean
	public KdniaoTrackQueryAPI initKdApi(KdNiaoProperties prop){
		KdniaoTrackQueryAPI api = new KdniaoTrackQueryAPI();
		api.setEBusinessID(prop.getEBusinessID());
		api.setAppKey(prop.getAppKey());
		return api;
	}

}
